{% extends 'base.html' %}
{% block content %}

<fieldset class="layui-elem-field layui-field-title" style="margin-top: 10px;">
  <legend>k8s集群管理信息</legend>
</fieldset>

<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
  <ul class="layui-tab-title">
    <li class="layui-this">集群节点信息</li>
    <li>Deployment清单</li>
    <li>集群Pod清单</li>
    <li>NameSpace信息</li>
    <li>Service信息</li>
    <li>路由信息</li>
  </ul>
  <div class="layui-tab-content" style="height: 100px;">
    <div class="layui-tab-item layui-show">
            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 10px;">
</fieldset>
<div class="layui-form">
  <table class="layui-table">
    <colgroup>
      <col width="100">
      <col width="100">
      <col width="100">
      <col width="100">
      <col width="30">
    </colgroup>
    <thead>
      <tr>
        <th>IP地址</th>
        <th>Host name</th>
        <th>CPU</th>
        <th>Memory</th>
        <th>操 作</th>
      </tr>
    </thead>
    <tbody>
    <tr>
        {% for k,v in info.items() %}
                <td>{{ v }}</td>
        {% endfor %}
        <td><a href="#"><i class="layui-icon"></i></a>&nbsp;&nbsp;<a href="#"><i class="layui-icon"></i></a></td>
    </tr>
    </tbody>
  </table>
</div>
    </div>
    <div class="layui-tab-item">
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 10px;">
</fieldset>
<div class="layui-form">
  <table class="layui-table">
    <colgroup>
      <col width="100">
      <col width="100">
      <col width="100">
    </colgroup>
    <thead>
      <tr>
        <th>NameSpace</th>
        <th>Deployment name</th>
        <th>操 作</th>
      </tr>
    </thead>
    <tbody>
        {% for d in dep %}
            <tr>
                <td>{{ d.namespace }}</td>
                <td>{{ d.name }}</td>
                <td width="10px"><a href="#"><a href="#"><i class="layui-icon"></i></a>&nbsp;&nbsp;<a href="#"><i class="layui-icon"></i></a></a></td></tr>
        {% endfor %}
    </tbody>
  </table>
</div>
    </div>
    <div class="layui-tab-item">
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 10px;">
</fieldset>
<div class="layui-form">
  <table class="layui-table">
    <colgroup>
      <col width="100">
      <col width="100">
      <col width="100">
      <col>
    </colgroup>
    <thead>
      <tr>
        <th>Pod_ip</th>
        <th>NameSpace</th>
        <th>Pod name</th>
        <th>操 作</th>
      </tr>
    </thead>
    <tbody>
        {% for i in pod %}
            <tr>
                <td>{{ i.podip }}</td>
                <td>{{ i.ns }}</td>
                <td>{{ i.pod_name }}</td>
                <td width="10px"><a href="#"><a href="#"><i class="layui-icon"></i></a>&nbsp;&nbsp;<a href="#"><i class="layui-icon"></i></a></a></td></tr>
        {% endfor %}
    </tbody>
  </table>
</div>
    </div>
    <div class="layui-tab-item">
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 10px;">
</fieldset>
<div class="layui-form">
  <table class="layui-table">
    <colgroup>
      <col width="100">
      <col width="100">
      <col width="100">
      <col>
    </colgroup>
    <thead>
      <tr>
        <th>NameSpace</th>
        <th>操 作</th>
      </tr>
    </thead>
    <tbody>
        {% for n in ns %}
            <tr>
                <td>{{ n }}</td>
                <td width="10px"><a href="#"><a href="#"><i class="layui-icon"></i></a>&nbsp;&nbsp;<a href="#"><i class="layui-icon"></i></a></a></td></tr>
        {% endfor %}
    </tbody>
  </table>
</div>
    </div>
    <div class="layui-tab-item">
     <fieldset class="layui-elem-field layui-field-title" style="margin-top: 10px;">
</fieldset>
<div class="layui-form">
  <table class="layui-table">
    <colgroup>
      <col width="100">
      <col width="100">
      <col width="100">
      <col>
    </colgroup>
    <thead>
      <tr>
        <th>ServiceName</th>
        <th>Type</th>
        <th>NameSpace</th>
        <th>Cluster_Ip</th>
        <th>Port</th>
      </tr>
    </thead>
    <tbody>
        {% for s in svc %}

            <tr>
            {% for a,b in s.items() %}
                <td>{{ b }}</td>
                {% endfor %}
            </tr>

        {% endfor %}
    </tbody>
  </table>
  </div>


    </div>
    <div class="layui-tab-item">路由信息</div>
  </div>
</div>
{% endblock %}

{% block js %}

{% endblock %}

